<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  

  
  <title>姚根深的博客</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="JAVA javascript vue react css html js blog 博客 姚根深">
<meta property="og:type" content="website">
<meta property="og:title" content="姚根深的博客">
<meta property="og:url" content="https://cnwik.gitee.io/blog/index.html">
<meta property="og:site_name" content="姚根深的博客">
<meta property="og:description" content="JAVA javascript vue react css html js blog 博客 姚根深">
<meta property="og:locale" content="zh_CN">
<meta property="article:author" content="姚根深">
<meta property="article:tag" content="JAVA javascript vue react css html js blog 博客 姚根深 程序员 职业 职场 考试 疑难 问题 参考">
<meta name="twitter:card" content="summary">
  
    <link rel="alternate" href="/blog/atom.xml" title="姚根深的博客" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  
<link rel="stylesheet" href="/blog/css/style.css">

<meta name="generator" content="Hexo 5.4.0"></head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/blog/" id="logo">姚根深的博客</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/blog/">Home</a>
        
          <a class="main-nav-link" href="/blog/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/blog/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="搜索"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="https://cnwik.gitee.io/blog"></form>
      </div>
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main">
  
    <article id="post-git使用参考" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/blog/2021/10/07/git%E4%BD%BF%E7%94%A8%E5%8F%82%E8%80%83/" class="article-date">
  <time datetime="2021-10-07T02:22:25.000Z" itemprop="datePublished">2021-10-07</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/blog/2021/10/07/git%E4%BD%BF%E7%94%A8%E5%8F%82%E8%80%83/">git使用参考</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h3 id="模拟使用场景操作"><a href="#模拟使用场景操作" class="headerlink" title="模拟使用场景操作"></a>模拟使用场景操作</h3><p>假设今天工作已经完成了 领导要检查我的代码<br>不可能直接抱着电脑过去吧！<br>我需要将写好的代码通过Git提交到某个服务器上去保存<br>所以需要使用Git做一些基本控制！</p>
<!-- 产品经理是个大傻瓜！ -->
<p>我突然发现我在注释里写了项目经理的坏话 忘删了<br>还不小心add了 完蛋了！<br>其实不用慌 可以通过git的相关指令还原到上次提交前的版本<br>当然 如果已经提交了 emmmm… 删库跑路吧！<br>通过git log日志信息 可以强制返回到任意想回到的提交版本<br>我们写完一个项目 需要发布 让普通用户可以看到<br>但是在内部还有一套测试代码 即开发预览版<br>这就涉及到分支的问题： 发布的版本一般是主分支的版本 测试版放在其他分支里</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br></pre></td><td class="code"><pre><span class="line">//Git主线的基本操作</span><br><span class="line">git init // git 项目初始化</span><br><span class="line">git status // 查看文件状态（保存或没保存）</span><br><span class="line">git add . // 添加所有文件</span><br><span class="line">git add 文件名 // 添加单个文件</span><br><span class="line">git commit -m &quot;描述信息&quot; // 提交到本地仓库</span><br><span class="line">git restore 文件名 // 还原到上次提交之前</span><br><span class="line">git log // 日志信息 获取版本号</span><br><span class="line">git log 只能查看本次提交之前的版本 有局限性</span><br><span class="line">git reset -- hard 版本号 // 还原到某个版本</span><br><span class="line">git reflog // 比log更强大的日志记录 可用于版本反复横跳</span><br><span class="line">git diff // 查看所有文件的修改记录</span><br><span class="line"></span><br><span class="line">//github远程服务器相关操作</span><br><span class="line">ssh-keygen -t rsa -C &quot;邮箱地址&quot; // 获取秘钥</span><br><span class="line">需要关联远程仓库才能进行操作</span><br><span class="line">git remote add origin 仓库地址</span><br><span class="line">git push origin 分支 // 把文件推入仓库</span><br><span class="line">但是这里会出问题 第一次上传会被拒绝访问</span><br><span class="line">原因是 上传文件之后会把创建仓库时自带的文件覆盖了</span><br><span class="line">解决办法：把那个文件先拉到本地 再一起上传！</span><br><span class="line">git pull origin 分支</span><br><span class="line">这时候又有问题了 也被拒绝了！原因是 之前没有访问过，所以不给你拿！</span><br><span class="line">这就很蛋疼 就像第一次找工作需要工作经验一样 没工作哪来的经验！</span><br><span class="line">解决办法： 活用百度！git 指令系统很庞大 非专业人士不可能去研究这么深入 我们也只是用一下常用的那些指令！</span><br><span class="line">git pull origin 分支 --allow-unrelated-histories // 解除访问限制</span><br><span class="line">git clone 项目地址 // 下载别人的开源代码</span><br><span class="line"></span><br><span class="line">//Git分支的基本操作</span><br><span class="line">git branch // 查看当前分支情况</span><br><span class="line">git branch 分支名 // 新建一个分支</span><br><span class="line">git checkout 分支名 // 切换分支</span><br><span class="line">为什么要用新分支 假如我需要修改这些代码的bug</span><br><span class="line">但是担心直接在主分支里改崩了 那就放到bug分支里去改</span><br><span class="line">这样，就算改崩了也不影响主分支的代码</span><br><span class="line">新建分支的目的就是为了合并分支 不能合并 分支就没有意义了</span><br><span class="line">git checkout a分支</span><br><span class="line">git merge b分支 // 把b分支合并到a</span><br><span class="line">而且各分支的提交记录也互不干扰！</span><br><span class="line">git branch -d 分支名 // 删除分支</span><br><span class="line">完成工作的时候 需要将本地分支与远程分支同步</span><br><span class="line">git push origin 远程分支：对应的本地分支</span><br><span class="line">但是！ 实际工作中是没有权限操作主分支和dev分支的</span><br><span class="line">就需要把自己的分支在远程 通过Pull Requests 申请合并到主要分支上去！</span><br><span class="line">git tag v1.01 // 创建分支版本号 可替代很长的hash值</span><br><span class="line">git tag v1.00 某个版本hash值// 给指定版本添加版本号</span><br><span class="line">git show 创建的版本号 // 查看指定版本的diff信息</span><br><span class="line">git tag -a 版本号 -m &quot;日志描述信息&quot; 日志hash值 // 为某个版本日志增加描述信息</span><br><span class="line">git tag -d 版本号 // 删除某个版本</span><br><span class="line">git log --graph // 让log 信息更美观一点</span><br></pre></td></tr></table></figure>
<h3 id="使用案例"><a href="#使用案例" class="headerlink" title="使用案例"></a>使用案例</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">git init</span><br><span class="line">git remote add origin git@gitee.com:cnwik/blog.git</span><br><span class="line">//这个是删除</span><br><span class="line">git remote rm origin</span><br><span class="line">git pull orgin master</span><br><span class="line"></span><br><span class="line">git add .</span><br><span class="line">git commit -m &#x27;版本&#x27;</span><br><span class="line">git push orgin master</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h3 id="小结"><a href="#小结" class="headerlink" title="小结"></a>小结</h3><p>gitee使用中建议使用ssh密钥进行配置</p>
<p>git使用参考 姚根深 2021.10.07</p>

      
    </div>
    <footer class="article-footer">
      <a data-url="https://cnwik.gitee.io/blog/2021/10/07/git%E4%BD%BF%E7%94%A8%E5%8F%82%E8%80%83/" data-id="ckugbr0kr0000foil7rif1ryo" class="article-share-link">Share</a>
      
      
    </footer>
  </div>
  
</article>


  
    <article id="post-mysql8-0安装配置" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/blog/2021/10/07/mysql8-0%E5%AE%89%E8%A3%85%E9%85%8D%E7%BD%AE/" class="article-date">
  <time datetime="2021-10-07T01:06:18.000Z" itemprop="datePublished">2021-10-07</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/blog/2021/10/07/mysql8-0%E5%AE%89%E8%A3%85%E9%85%8D%E7%BD%AE/">mysql8.0安装配置</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h3 id="下载解压缩Mysql压缩文件"><a href="#下载解压缩Mysql压缩文件" class="headerlink" title="下载解压缩Mysql压缩文件"></a>下载解压缩Mysql压缩文件</h3><p><a target="_blank" rel="noopener" href="https://dev.mysql.com/downloads/file/?id=476233">官方下载地址</a><br>解压缩到安装目录<br>查看高级系统设置中添加PATH</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">D:\mysql\bin</span><br></pre></td></tr></table></figure>

<h3 id="基础配置信息"><a href="#基础配置信息" class="headerlink" title="基础配置信息"></a>基础配置信息</h3><figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br></pre></td><td class="code"><pre><span class="line">[mysqld]</span><br><span class="line">服务器ID</span><br><span class="line">server-id=111</span><br><span class="line"># 设置3306端口</span><br><span class="line">port=3306</span><br><span class="line"># 设置mysql的安装目录</span><br><span class="line">basedir=D:\\mysql\\bin</span><br><span class="line"># 设置mysql数据库的数据的存放目录</span><br><span class="line">datadir=D:\\mysql\\bin\\Data</span><br><span class="line"># 允许最大连接数</span><br><span class="line">max_connections=200</span><br><span class="line"># 允许连接失败的次数。这是为了防止有人从该主机试图攻击数据库系统</span><br><span class="line">max_connect_errors=10</span><br><span class="line"># 服务端使用的字符集默认为UTF8</span><br><span class="line">character-set-server=utf8mb4</span><br><span class="line"># 设置服务端校验规则</span><br><span class="line">collation-server=utf8mb4_general_ci</span><br><span class="line"># 创建新表时将使用的默认存储引擎</span><br><span class="line">default-storage-engine=INNODB</span><br><span class="line"># 默认使用“mysql_native_password”插件认证</span><br><span class="line">default_authentication_plugin=mysql_native_password</span><br><span class="line">#单服务器</span><br><span class="line">skip-external-locking</span><br><span class="line">#默认存储</span><br><span class="line">default-storage-engine=INNODB</span><br><span class="line">#自动任务</span><br><span class="line">event_scheduler=ON</span><br><span class="line">#报错回滚</span><br><span class="line">sql-mode=&quot;STRICT_TRANS_TABLES&quot;</span><br><span class="line">lower_case_table_names=1</span><br><span class="line">#最大数据包</span><br><span class="line">max_allowed_packet=16M</span><br><span class="line">#分组合并字段长度</span><br><span class="line">group_concat_max_len=102400</span><br><span class="line">#可根据配置提升</span><br><span class="line">thread_concurrency=8</span><br><span class="line">thread_cache_size=120</span><br><span class="line">innodb_thread_concurrency=32</span><br><span class="line">innodb_buffer_pool_size=512M</span><br><span class="line">#索引缓冲</span><br><span class="line">key_buffer_size=256M</span><br><span class="line">#排序缓冲</span><br><span class="line">sort_buffer_size=6M</span><br><span class="line">myisam_sort_buffer_size = 64M　　</span><br><span class="line">#联合查询缓冲</span><br><span class="line">join_buffer_size=8M</span><br><span class="line">#查询缓冲</span><br><span class="line">table_cache=512</span><br><span class="line">tmp_table_size=256M</span><br><span class="line">query_cache_size=16M</span><br><span class="line">read_buffer_size=4M</span><br><span class="line">read_rnd_buffer_size=16M</span><br><span class="line"></span><br><span class="line">[mysqldump]</span><br><span class="line">quick</span><br><span class="line">max_allowed_packet = 128M</span><br><span class="line"></span><br><span class="line">[myisamchk]</span><br><span class="line">key_buffer_size = 20M</span><br><span class="line">sort_buffer_size = 256k</span><br><span class="line">read_buffer = 2M</span><br><span class="line">write_buffer = 2M</span><br><span class="line"></span><br><span class="line">[mysqlhotcopy]</span><br><span class="line">interactive-timeout</span><br><span class="line"></span><br><span class="line">[mysqld_safe]</span><br><span class="line">#增加每个进程的可打开文件数量.</span><br><span class="line">open-files-limit = 28192</span><br><span class="line"></span><br><span class="line">[mysql]</span><br><span class="line">#设置mysql客户端默认字符集</span><br><span class="line">default-character-set=utf8mb4</span><br><span class="line">#关闭自动提醒</span><br><span class="line">no-auto-rehash</span><br><span class="line">#更新删除限定</span><br><span class="line">safe-updates</span><br><span class="line"></span><br><span class="line">[client]</span><br><span class="line"># 设置mysql客户端连接服务端时默认使用的端口</span><br><span class="line">port=3307</span><br><span class="line">default-character-set=utf8mb4</span><br></pre></td></tr></table></figure>

<h3 id="安装操作"><a href="#安装操作" class="headerlink" title="安装操作"></a>安装操作</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> d:\mysql\bin</span><br><span class="line">mysqld --initialize --console //初始化会提示密码信息</span><br><span class="line">mysqld --install mysql</span><br><span class="line">net start mysql</span><br><span class="line"></span><br><span class="line">mysql -u root -p</span><br><span class="line">输入初始化得到的密码</span><br><span class="line">修改密码</span><br><span class="line">ALTER USER <span class="string">&#x27;root&#x27;</span>@<span class="string">&#x27;localhost&#x27;</span> IDENTIFIED WITH mysql_native_password BY <span class="string">&#x27;密码&#x27;</span>; </span><br></pre></td></tr></table></figure>

<h3 id="小结"><a href="#小结" class="headerlink" title="小结"></a>小结</h3><p>配置为参考配置根据具体环境灵活添加修改<br>配置文件my.ini放入D:\mysql\bin目录下</p>
<p>mysql8.0安装配置 姚根深 2021.10.07</p>

      
    </div>
    <footer class="article-footer">
      <a data-url="https://cnwik.gitee.io/blog/2021/10/07/mysql8-0%E5%AE%89%E8%A3%85%E9%85%8D%E7%BD%AE/" data-id="ckugbr0kx0002foilbvhfe4xa" class="article-share-link">Share</a>
      
      
    </footer>
  </div>
  
</article>


  
    <article id="post-hello-world" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/blog/2021/10/02/hello-world/" class="article-date">
  <time datetime="2021-10-02T02:05:45.000Z" itemprop="datePublished">2021-10-02</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/blog/2021/10/02/hello-world/">gitee发布hexo博客具体方法</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h3 id="安装软件及管理工具"><a href="#安装软件及管理工具" class="headerlink" title="安装软件及管理工具"></a>安装软件及管理工具</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">npm install hexo</span><br><span class="line">hexo init</span><br><span class="line">mkdir hexo</span><br><span class="line"><span class="built_in">cd</span> hexo</span><br><span class="line">hexo install</span><br><span class="line">npm install --save hexo-deployer-git</span><br><span class="line">npm install --save hexo-admin</span><br></pre></td></tr></table></figure>

<h3 id="基础配置信息"><a href="#基础配置信息" class="headerlink" title="基础配置信息"></a>基础配置信息</h3><figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Site</span></span><br><span class="line"><span class="attr">title:</span> <span class="string">姚根深的博客</span></span><br><span class="line"><span class="attr">subtitle:</span> <span class="string">&#x27;&#x27;</span></span><br><span class="line"><span class="attr">description:</span> <span class="string">&#x27;JAVA javascript vue react css html js blog 博客 姚根深&#x27;</span></span><br><span class="line"><span class="attr">keywords:</span>  <span class="string">&#x27;JAVA javascript vue react css html js blog 博客 姚根深 程序员 职业 职场 考试 疑难 问题 参考&#x27;</span></span><br><span class="line"><span class="attr">author:</span> <span class="string">姚根深</span></span><br><span class="line"><span class="attr">language:</span> <span class="string">zh-CN</span></span><br><span class="line"><span class="attr">timezone:</span> <span class="string">&#x27;Asia/Shanghai&#x27;</span></span><br><span class="line"><span class="attr">deploy:</span></span><br><span class="line">  <span class="attr">type:</span> <span class="string">git</span></span><br><span class="line">  <span class="attr">repo:</span> <span class="string">git@gitee.com:cnwik/blog.git</span></span><br><span class="line">  <span class="attr">branch:</span> <span class="string">master</span></span><br><span class="line"><span class="comment"># URL</span></span><br><span class="line"><span class="comment">## Set your site url here. For example, if you use GitHub Page, set url as &#x27;https://username.github.io/project&#x27;</span></span><br><span class="line"><span class="attr">url:</span>  <span class="string">https://cnwik.gitee.io/blog</span></span><br><span class="line"><span class="attr">root:</span> <span class="string">/blog</span></span><br></pre></td></tr></table></figure>

<h3 id="hexo操作"><a href="#hexo操作" class="headerlink" title="hexo操作"></a>hexo操作</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">hexo g //本地发布</span><br><span class="line">hexo d //发布到gitee</span><br><span class="line">hexo s //启动服务</span><br></pre></td></tr></table></figure>

<h3 id="预览及管理界面"><a href="#预览及管理界面" class="headerlink" title="预览及管理界面"></a>预览及管理界面</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">http://localhost:4000/blog/</span><br><span class="line">http://localhost:4000/blog/admin/</span><br></pre></td></tr></table></figure>

<h3 id="文件及样式修改"><a href="#文件及样式修改" class="headerlink" title="文件及样式修改"></a>文件及样式修改</h3><p>根据需要进行主题的样式修改<br>\hexo\themes\landscape\layout_partial\after-footer.ejs</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">&lt;script src=<span class="string">&quot;//code.jquery.com/jquery-2.0.3.min.js&quot;</span>&gt;&lt;/script&gt;</span><br></pre></td></tr></table></figure>
<p>\hexo\themes\landscape\source\css_variables.styl</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">// Header</span><br><span class="line">logo-size = 16px</span><br><span class="line">subtitle-size = 14px</span><br><span class="line">banner-height = 100px</span><br></pre></td></tr></table></figure>
<p>\hexo\themes\landscape\source\css_partial\footer.styl</p>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-id">#footer</span></span><br><span class="line">  <span class="attribute">background</span>: color-footer-background</span><br><span class="line">  padding: <span class="number">20px</span> <span class="number">0</span></span><br></pre></td></tr></table></figure>
<h3 id="一键三连"><a href="#一键三连" class="headerlink" title="一键三连"></a>一键三连</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo clean &amp;&amp; hexo g &amp;&amp; hexo d</span><br></pre></td></tr></table></figure>
<p>提交到gitee资源后，需要登录gitee pages服务中去发布或更新。</p>
<h3 id="小结"><a href="#小结" class="headerlink" title="小结"></a>小结</h3><p>在处理过程中遇到几个问题说明一下：<br>gitee配置需要申请ssh访问，在仓库中添加自己的SSH密钥即可；<br>出现js/css资源无法访问请修改配置中的url及root信息，jquery.min.js文件需更换地址；<br>如果配置文件中没有的信息请自行添加。  </p>
<p>gitee发布hexo博客具体方法 姚根深 2021.10.02</p>

      
    </div>
    <footer class="article-footer">
      <a data-url="https://cnwik.gitee.io/blog/2021/10/02/hello-world/" data-id="ckugbr0kv0001foil5lu1clxl" class="article-share-link">Share</a>
      
      
    </footer>
  </div>
  
</article>


  


</section>
        
          <aside id="sidebar">
  
    

  
    

  
    
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">归档</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2021/10/">十月 2021</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">最新文章</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/blog/2021/10/07/git%E4%BD%BF%E7%94%A8%E5%8F%82%E8%80%83/">git使用参考</a>
          </li>
        
          <li>
            <a href="/blog/2021/10/07/mysql8-0%E5%AE%89%E8%A3%85%E9%85%8D%E7%BD%AE/">mysql8.0安装配置</a>
          </li>
        
          <li>
            <a href="/blog/2021/10/02/hello-world/">gitee发布hexo博客具体方法</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2021 姚根深<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>
    </div>
    <nav id="mobile-nav">
  
    <a href="/blog/" class="mobile-nav-link">Home</a>
  
    <a href="/blog/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    

<script src="//code.jquery.com/jquery-2.0.3.min.js"></script>


  
<link rel="stylesheet" href="/blog/fancybox/jquery.fancybox.css">

  
<script src="/blog/fancybox/jquery.fancybox.pack.js"></script>




<script src="/blog/js/script.js"></script>




  </div>
</body>
</html>